<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="net.ojbk.saishi.service.*" %>
<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title>赛事发布页面</title>
	<link href="css/bootstrap-jf.min.css" rel="stylesheet">
	<link href="css/datepicker3-jf.css" rel="stylesheet">
	<link href="css/styles-jf.css" rel="stylesheet">
</head>

<body>
	<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
		<div class="container-fluid">
			<div class="navbar-header">
				<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#sidebar-collapse">
					<span class="sr-only">Toggle navigation</span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
				</button>
				<a class="navbar-brand" href="home.jsp"><span>师易</span>赛事服务平台</a>
				<ul class="user-menu">
					<li class="dropdown pull-right">
						<a href="home.jsp" class="dropdown-toggle">个人主页</a>
					</li>
				</ul>
			</div>

		</div><!-- /.container-fluid -->
	</nav>

	<div id="sidebar-collapse" class="col-sm-3 col-lg-2 sidebar">
		<form role="search">
			<div class="form-group">
				<input type="text" class="form-control" placeholder="欢迎来到师易赛事服务平台">
			</div>
		</form>
		<ul class="nav menu">
			<li><a href="all.jsp"><span class="glyphicon glyphicon-stats"></span> 全部赛事</a></li> 
			<li role="presentation" class="divider">主办方</li>  
			<li  class="active"><a href="launch.jsp"><span class="glyphicon glyphicon-list-alt"></span>发布赛事</a></li>
			<li><a href="havaLaunch.jsp"><span class="glyphicon glyphicon-dashboard"></span>已发布赛事</a></li>
			<li><a href="tatistics.jsp"><span class="glyphicon glyphicon-th"></span> 赛事情况统计</a></li>
			<li><a href="backstage.jsp"><span class="glyphicon glyphicon-th"></span> 赛事后台</a></li>
			<li role="presentation" class="divider">参赛方</li>  
			<li><a href="part.jsp"><span class="glyphicon glyphicon-user"></span> 参赛赛事</a></li>
			<li><a href="havaPart.jsp"><span class="glyphicon glyphicon-user"></span> 已赛赛事</a></li>
		</ul>
		<div class="attribution">赛事服务 by <a href="#">师易</a></div>
	</div><!--/.sidebar-->


	<div class="col-sm-9 col-sm-offset-3 col-lg-10 col-lg-offset-2 main">			
		<div class="row">
			<ol class="breadcrumb">
				<li><a href="all.jsp"><span class="glyphicon glyphicon-home"></span></a></li>
				<li class="active">Launch</li>
			</ol>
		</div><!--/.row-->

		<div class="row">
			<div class="col-lg-12">
				<h1 class="page-header">Launch</h1>
			</div>
		</div><!--/.row-->


		<div class="row">
			<div class="col-lg-12">
				<div class="panel panel-default">
					<div class="panel-heading">师易赛事 - 发布赛事</div>
					<div class="panel-body">
						<div class="">
							<form role="form" action="LaunchEventServlet" method="post" enctype="multipart/form-data">

								<div class="form-group" >
									<fieldset style="border:1px solid black;padding:5px 5px 10px;wrid">
										<label>赛事介绍</label>
										<hr >
										<div class="form-row">
											<div class="field-label"><label for="field1">赛事标题</label>:</div>
											<div class="field-widget"><input name="title" id="field1" class="form-control" title="Enter your name" /></div>
										</div>

										<div class="form-row">
											<div class="field-label"><label for="field2">赛事介绍</label>:</div>
											<div class="field-widget">
											<!-- line-height: 70px -->
											<textarea cols="50" rows="10" class="form-control" style="" name="content"></textarea></div>
										</div>

										<div class="form-row">
											<div class="field-label"><label for="field3">赛事海报</label>:</div>
											<div class="field-widget"><input name="poster" id="field2" type="file" class="form-control" title="Enter your name" /></div>
										</div>    
									</fieldset>   
								</div>

								<div class="form-group" >
									<fieldset style="border:1px solid black;padding:5px 5px 10px">
										<label>参赛配置(自动生成参赛表格)</label>
											<hr>
											<fieldset style="border:1px solid black;padding:5px 5px 10px;margin-top: 8px;margin-left:5px;" >
												<label>所需基本信息:</label>
												
												<%
												for (String basicInfo : MatchBackService.getAllSupportBasicInfoName()) {
												%>
												<label><input type="checkbox" name="basicInfo" value="<%= basicInfo %>"> <%= basicInfo %></label>
												<% } %>
											</fieldset>
											<fieldset style="border:1px solid black;padding:5px 5px 10px;margin-top: 8px;margin-left:5px;">
												<label>其他所需信息</label>
												<br>
												
												<script type="text/javascript">
												function extraInfoDiv(){
												 $("#extraInfoDiv").prepend('<label><input type="checkbox" name="extraInfo" checked="true" value="' + $("#extraIn").val() + '" >' + $("#extraIn").val() + '</label>');
												}
												</script>
												
													<label><input id="extraIn" placeholder="填入其他所需信息" class="form-control"></label> 
													<label><input type="button" onclick="extraInfoDiv()" value="添加">
													</label> 
													<br>
													<div id="extraInfoDiv">
													</div>
												</fieldset>
												<fieldset style="border:1px solid black;padding:5px 5px 10px;margin-top: 8px;margin-left:5px;">
													<label>所需作品文件</label><hr>
													<div class="form-group">
														<div class="field-label"><label for="field9">是否需要文件：</label>:</div>
														<div class="field-label">
															<input type="radio" class="radio_input" name="needFile" id="field11-male" value="true" />是
															<input type="radio" class="radio_input" name="needFile" id="field11-female" value="false"/>否
														</div>
													</div>


													<div class="form-group">
														<div class="field-label"><label for="field9">文件名格式要求：</label>:</div>
														<div class="field-label">
															<input name="fileFormat" id="field9" class="form-control" title="文件格式要求" placeholder="例如：[id]-[name]" />		
														</div>
													</div>
												</fieldset>

											</fieldset>
										</div>
								<div class="form-group" >
											<fieldset style="border:1px solid black;padding:5px 5px 10px">
												<label>赛事配置</label><hr>
												<div class="form-row">
													<div class="field-label">
													<label for="field9">报名截止时间：</label>
													<input type="datetime-local" name="endTime" value=""/>
													</div>
												</div>
												<div class="form-row">
													<div class="field-label"><label for="field7">赛事密码：</label></div>
													<div class="field-widget"><input name="pw" id="field7" class="form-control"  title="Enter a password greater than 6 characters" /></div>
												</div>
											</fieldset>
										</div>	

								<div  style="position: absolute; bottom: -70px; left: 40px;">

											<button type="submit" class="btn btn-primary">Submit Button</button>
											<button type="reset" class="btn btn-default">Reset Button</button>
										</div>
							</form>

								</div>
							</div>
						</div>
				</div><!-- /.col-->
			</div><!-- /.row -->
		
		</div><!--/.main-->

			<script src="js/jquery-1.11.1.min-jf.js"></script>
			<script src="js/bootstrap.min-jf.js"></script>
			<script src="js/chart.min-jf.js"></script>
			<script src="js/chart-data-jf.js"></script>
			<script src="js/easypiechart-jf.js"></script>
			<script src="js/easypiechart-data-jf.js"></script>
			<script src="js/bootstrap-datepicker-jf.js"></script>
			<script>
				!function ($) {
					$(document).on("click","ul.nav li.parent > a > span.icon", function(){		  
						$(this).find('em:first').toggleClass("glyphicon-minus");	  
					}); 
					$(".sidebar span.icon").find('em:first').addClass("glyphicon-plus");
				}(window.jQuery);

				$(window).on('resize', function () {
					if ($(window).width() > 768) $('#sidebar-collapse').collapse('show')
				})
				$(window).on('resize', function () {
					if ($(window).width() <= 767) $('#sidebar-collapse').collapse('hide')
				})
		</script>	
	</body>

	</html>

